﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FactoryMethod
{
    public abstract class OperationFactory
    {
        public abstract Operation CreateionOperation();
    }

    public class AddFactory : OperationFactory
    {
        public override Operation CreateionOperation()
        {
            return new OperationAdd();
        }
    }

    public class SubFactory : OperationFactory
    { 
        public override Operation CreateionOperation()
        {
            return new OperationSub();
        }   
    }

    public class MulFactory : OperationFactory
    { 
        public override Operation CreateionOperation()
        {
            return new OperationMul();
        }    
    }

    public class DivFactory : OperationFactory
    { 
        public override Operation CreateionOperation()
        {
            return new OperationDiv();
        }    
    }

}
